const mongoose=require('mongoose')
const fs=require('fs')
const path=require('path')
const {host,opts}=require('../../config/db')
mongoose.connect(host,opts).catch(err=>{
    let filePath=path.join(path.dirname(__dirname,'logs','connect.log'))
    fs.appendFileSync(filePath,'sorry')
})
module.exports=mongoose